home *** CD-ROM | disk | FTP | other *** search
- /*
- File: EventTimer.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __LIMITS__
- #include <Limits.h>
- #endif
-
- #ifndef __TIMER__
- #include <Timer.h>
- #endif
-
- /***********************************|****************************************/
-
- class TEventTimer {
- public:
- TEventTimer ( void );
- ~TEventTimer ( );
-
- void Start ( ) ;
- void Stop ( );
-
- Boolean IsTimerActive ( ) const;
- Boolean IsTimerTaskInQueue ( ) const;
-
- unsigned long GetElapsedTimeInMicroseconds ( ) const;
-
- private:
- TMTask fTimeManagerTask;
- Boolean fTimerTaskInQueue;
- };
-
- /***********************************|****************************************/
-
- inline Boolean TEventTimer::IsTimerActive ( ) const
- {
- return ( fTimeManagerTask.qType & 0x8000 );
- }
-
- /***********************************|****************************************/
-
- inline Boolean TEventTimer::IsTimerTaskInQueue () const
- {
- return fTimerTaskInQueue;
- }
-
- /***********************************|****************************************/
-